package homework17;


import com.sun.javaws.jnl.XMLUtils;

@SuppressWarnings({"all"})
public class Client {
    public static <concreteDogTarget> void main(String[] args) {
        //适配器
//        Adapter adapter = (Adapter) XMLUtils.getBean("adapterPattern");
//
//        //目标类通过适配器调用适配者方法
//        CatTarget concreteCatTarget = (ConcreteCatTarget) XMLUtils.getBean("adapterPatternTarger");
//        adapter.setCatTarget(concreteCatTarget);
//        adapter.cry();
//
//        //适配者通过适配器调用目标类方法
//        DogAdaptee concreteDogAdaptee = (concreteDogTarget) XMLUtils.getBean("adapterPatternAdaptee");
//        adapter.setDogAdaptee(concreteDogAdaptee);
//        adapter.catMouse();


        ConcreteCatTarget concreteCatTarget;
        concreteCatTarget = (ConcreteCatTarget) XMLUtil.getBean();
        concreteCatTarget.catMouse();
    }
}
